/*
 * Copyright (c) 2018. czmc All Rights Reserved.
 * Author: czmc
 * Email: zxc6355533@163.com
 * Encoding: UTF-8
 */

package top.stime21.framework.mvp

import android.content.Context
import android.support.v7.app.AppCompatActivity
import android.widget.Toast

/**
 * 备用
 */
open  class BaseActivity: AppCompatActivity(),MvpView {

    override fun onLoginTimeOut() {

    }
    override fun showViewLoadding() {
    }
    override fun hideLodding() {
        if(loadding!=null){
            loadding.hide()
        }
    }

    override fun showEmpty(){

    }

    override fun showContent(){

    }

    override fun showError() {
    }

    override fun showToast(str: String) {
        Toast.makeText(this,str, Toast.LENGTH_SHORT).show()
    }

    val loadding:LoadingDialog by lazy {
        LoadingDialog(this)
    }
    override fun context(): Context {
        return this
    }
    override fun showLoadding() {
        loadding.show()
    }

}